package com.seed.uaa.pojo;

import com.seed.uaa.enumeration.PermiOwner;

import java.util.List;

public class UserAction extends OwnerAction {
    private List<RoleAction> roleActions;
    private List<OrganizationAction> positionActions;

    public UserAction(String id, String name) {
        super(PermiOwner.user, id, name);
    }

    public List<RoleAction> getRoleActions() {
        return roleActions;
    }

    public void setRoleActions(List<RoleAction> roleActions) {
        this.roleActions = roleActions;
    }

    public List<OrganizationAction> getPositionActions() {
        return positionActions;
    }

    public void setPositionActions(List<OrganizationAction> positionActions) {
        this.positionActions = positionActions;
    }

//    protected void initRealActions() {
//        realActions = new ArrayList<>(actions);
//        for(RoleAction roleAction: roleActions) realActions.addAll(roleAction.actions);
//
//        if(organizationAction != null) realActions.retainAll(organizationAction.getRealActions());
//
//        for(OrganizationAction positionAction: positionActions) {
//            realActions.addAll(positionAction.getRealActions());
//        }
//    }
}
